<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
*{
    padding: 0;
    margin: 0;
}
html{
    background-color: antiquewhite;
}
        img{
            width: 40px;
            height: 40px;
        }
        .box1{
            text-align: center;
            margin-bottom: 20px;
        }
       .box2> .item{
            display: flex;
            justify-content: space-around;
            margin-bottom: 20px;
            background-color: white;
        }
    </style>
</head>

<body>
    <div id ="arr">
        <div class="box1">
            <p>任务列表</p>
            <span>每完成一个任务,即可获得10MB-1GB流量哦</span>
        </div>
        <div class="box2">
            <div class="item" v-for="(item,index) in tasklist" v-bind:key="index">
                <div class="banner">
                    <img v-bind:src="item.pic" alt="">
                </div>
                <div class="migu">
                    <div class="name">{{ item.name }}</div>
                    <div class="name1">{{ item.desc }}</div>
                </div>
                <div class="right">
                    <button >{{ item.status == 1? '去完成': (item.status == 2? '领取':'已领取')}}</button>
                </div>
            </div>


        </div>


    </div>
</body>

</html>
<script src="./vue-2.5.21.js"></script>
<script>
    var v = new Vue({
        el: '#arr',
        data: {
            tasklist: [
                { id: 1, pic: './images/pic.png', name: '咪咕视频送流量', desc: '来咪咕视频,每月领500M', status: 1 },
                { id: 2, pic: './images/pic.png', name: '和彩云送福利', desc: '来咪咕视频,每月领1024M', status: 2 },
                { id: 3, pic: './images/pic.png', name: '最高40元套餐折扣卷', desc: '来咪咕视频,每月领2048M', status: 3 },
                { id: 4, pic: './images/pic.png', name: '吃喝玩乐季，超级秒杀', desc: '来咪咕视频,每月领5G', status: 1 },
                { id: 5, pic: './images/pic.png', name: '咪咕视频送女朋友', desc: '来咪咕视频,每月领1500M', status: 2 }
            ]
        }



    })
</script>